package com.shiyang.singleton.type2;

/**
 * @author shiyang date: 2020/9/3
 */
public class Singleton02 {

}

class Singleton {
    private Singleton() {

    }

    private static final Singleton instance;

    static {
        instance = new Singleton();
    }

    public static Singleton getInstance() {
        return instance;
    }
}
